package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-15
 */
public class BotguardData implements Sequenceable, Serializable {
    @SerializedName("interpreterUrl")
    private String interpreterUrl;

    @SerializedName("program")
    private String program;

    public static final Sequenceable.Producer<BotguardData> CREATOR = new Producer<BotguardData>() {
        @Override
        public BotguardData createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            BotguardData botguardData = new BotguardData();
            botguardData.unmarshalling(parcel);
            return botguardData;
        }
    };


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.interpreterUrl);
        parcel.writeString(this.program);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.interpreterUrl=parcel.readString();
        this.program=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "BotguardData{" +
                "interpreterUrl = '" + interpreterUrl + '\'' +
                ",program = '" + program + '\'' +
                "}";
    }

    public String getInterpreterUrl() {
        return interpreterUrl;
    }

    public void setInterpreterUrl(String interpreterUrl) {
        this.interpreterUrl = interpreterUrl;
    }

    public String getProgram() {
        return program;
    }

    public void setProgram(String program) {
        this.program = program;
    }
}
